package cn.stylefeng.guns.modular.business.custom.enums;

/**
 * @Description:
 * @Author jzy
 * @Date 2019/10/29 0029
 **/
public class RedisKey {

    public static final String TOKEN_ACCOUNT_MAP = "token_account_map";

    public static final String FILE_TOKENS = "file_tokens_backend";
    //省市区
    public static final String CACHE_PROVINCE_CITY_AREA_TEMPLATE = "cache:map:area:list:city-area";
    //省市
    public static final String CACHE_PROVINCE_CITY_TEMPLATE = "cache:map:area:list:province_city";
    //市=>区
    public static final String CACHE_CITY_AREA_TEMPLATE = "cache:map:area:list:area";
    //车型
    public static final String CACHE_CAR_TYPE = "cache:map:list:cartype";

    public static final String CACHE_MENU_ROLE_TEMPLATE = "cache:map:list:role-menu";

    //短信监听通道
    public static final String DY_SMS = "dy_sms";

    // 所有行政区域
    public static final String CACHE_REGION_ALL = "cache:list:region-all";

    public static final String CACHE_CITY_LIST = "cache:list:city";
    public static final String CACHE_CITY_TREE_LIST = "cache:list:treecity";

    public static final String CACHE_CITY_SORT_ZSET = "cache:zset:city";

    public static final String CACHE_CITY_ALPHABET = "cache:list:city-alphabet";


    public static String generateRedisKey(String prefix, Object... args) {
        StringBuilder sb = new StringBuilder(prefix);
        for (Object arg : args) {
            sb.append(":").append(arg);
        }
        return sb.toString();
    }
}
